<!--
  @author yangjiangming
  @date 2018-12-11 14:32:39
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>工单详情</title>
    <th:block th:replace="common/common :: jscss"/>
    <link rel="stylesheet" href="/static/style/order/order.detail.css?version=20221013001">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_2160613_58whebz5xe9.css">
</head>
<body>
<input type="hidden" id="workId" name="workId" th:value="${detailVo.code}">
<input type="hidden" id="orderId" name="orderId" th:value="${detailVo.orderId}">
<input type="hidden" id="channelId" name="channelId" th:value="${detailVo.channelId}">
<input type="hidden" id="communityId" name="communityId" th:value="${detailVo.communityId}">
    <div class="work-detail" th:fragment="detail">
        <div class="layui-card">
            <div class="layui-card-body">
<!--                <section th:if="${detailVo.userId > 0}">-->
<!--                    &lt;!&ndash;用户画像&ndash;&gt;-->
<!--                    <div th:if="${#authPermit.checkPermit('/common/user/profile/list.action')}" class="layui-row" style="border: 1px solid #d2d2d2;margin: 0px 0px 5px 0px;">-->
<!--                        <iframe  name="user-profile-frame"-->
<!--                                id="user-profile-frame"-->
<!--                                th:src="|${SYS_UMS}/common/user/profile/list.action?orderId=${detailVo.orderId}|"-->
<!--                                height="180"-->
<!--                                width="100%"-->
<!--                                frameborder="0"-->
<!--                                scrolling="no">-->
<!--                        </iframe>-->
<!--                    </div>-->
<!--                </section>-->

            <section>
                <!--<h3>工单详情</h3>-->
                <div class="detail-base-info">
                    <div class="layui-row">
                        <div class="layui-col-xs6 info-left">
                            <div class="grid-demo grid-demo-bg1">
                                <table class="layui-table table-info" lay-skin="nob" lay-size="lg">
                                    <colgroup>
                                        <col width="80">
                                        <col>
                                    </colgroup>
                                    <tbody>
                                    <th:block th:with="warningVO = ${detailVo.warningVO}"
                                              th:if="${detailVo.warningVO != null}">
                                        <th:block
                                                th:if="${warningVO.isEmphasisChannel or warningVO.isVip or
                                                     warningVO.isChannelWarning or warningVO.isVisitEarlyWarning or
                                                     warningVO.isFinalPrice or warningVO.complainLevel > 0 or
                                                     warningVO.hasAbnormal or warningVO.hasWarning or warningVO.hasTimeout or
                                                     warningVO.isQuotation or warningVO.isQuotationThree or warningVO.isAdvancePay or
                                                     warningVO.isSuspend or warningVO.isDutyFailed or
                                                     warningVO.isReworkDemand or warningVO.isNineDollarsNine or
                                                     warningVO.isZhuoSecurity or warningVO.isQuotationValid!=null or
                                                     warningVO.isAllowRefund or warningVO.isHighValueUser or warningVO.isTest or
                                                     warningVO.isRefundWaitReview or warningVO.isRemit or
                                                     (warningVO.tagList != null and not #lists.isEmpty(warningVO.tagList))
                                                     }">
                                            <tr>
                                                <td></td>
                                                <td>
                                                    <th:block th:if="${detailVo.member == 2}">
                                                        <span class="layui-badge work-warning work-warning-yikoujia"
                                                              th:text="延保订单"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isEmphasisChannel}">
                                                        <span class="layui-badge work-warning work-warning-important"
                                                              th:text="重点渠道"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isVip}">
                                                        <span class="layui-badge work-warning work-warning-vip"
                                                              th:text="VVIP"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isChannelWarning}">
                                                        <span class="layui-badge work-warning work-warning-channel-warning"
                                                              th:text="渠道预警"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isVisitEarlyWarning}">
                                                        <span class="layui-badge work-warning work-warning-channel-warning"
                                                              th:text="提前上门"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isFinalPrice}">
                                                        <span class="layui-badge work-warning work-warning-yikoujia"
                                                              th:text="一口价"></span>
                                                    </th:block>
                                                    <th:block th:with="level = ${warningVO.complainLevel}">
                                                        <th:block th:if="${level != null and level > 0}">
                                                                  <span class="layui-badge work-warning"
                                                                        th:classappend="|zmn-complaint-level-${level}|"
                                                                        th:text="${warningVO.complainLevelName}"></span>
                                                        </th:block>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.hasAbnormal}">
                                                        <span class="layui-badge work-warning work-warning-abnormal"
                                                              th:text="服务异常"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.hasWarning}">
                                                        <span class="layui-badge work-warning work-warning-warning"
                                                              th:text="预警"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.hasTimeout}">
                                                        <span class="layui-badge work-warning work-warning-timeout"
                                                              th:text="超时"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isQuotation}">
                                                        <span class="layui-badge work-warning work-warning-quotation"
                                                              th:text="计价器"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isAdvancePay}">
                                                        <span class="layui-badge work-warning work-warning-quotation"
                                                              th:text="提前付"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isQuotationThree}">
                                                        <span class="layui-badge work-warning work-warning-quotation"
                                                              th:text="计价器3.0"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isSuspend}">
                                                        <span class="layui-badge work-warning work-warning-suspend"
                                                              th:text="挂起"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isDutyFailed}">
                                                        <span class="layui-badge work-warning work-warning-suspend"
                                                              th:text="预约失败"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isNineDollarsNine}">
                                                        <span class="layui-badge work-warning work-warning-suspend"
                                                              th:text="9.9会员"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isZhuoSecurity}">
                                                        <span class="layui-badge work-warning work-warning-suspend"
                                                              th:text="返修派"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isQuotationValid !=null}">
                                                        <th:block th:if="${warningVO.isQuotationValid}">
                                                            <span class="layui-badge work-warning work-warning-valid-quotation"
                                                                  style="width: 100px" th:text="计价器-有效使用"></span>
                                                        </th:block>
                                                        <th:block th:unless="${warningVO.isQuotationValid}">
                                                            <span class="layui-badge work-warning work-warning-complaint"
                                                                  style="width: 100px" th:text="计价器-无效使用"></span>
                                                        </th:block>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isAllowRefund}">
                                                        <span class="layui-badge work-warning work-warning-suspend"
                                                              th:text="三日退"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isHighValueUser}">
                                                        <span class="layui-badge work-warning work-warning-high-value-user"
                                                              th:text="高价值"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isTest}">
                                                        <span class="layui-badge work-warning work-warning-test"
                                                              th:text="测试"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isRefundWaitReview}">
                                                        <span class="layui-badge work-warning work-warning-refund-review"
                                                              th:text="审"></span>
                                                    </th:block>
                                                    <th:block th:if="${warningVO.isRemit}">
                                                        <span class="layui-badge work-warning work-warning-refund-remit"
                                                              th:text="待退款"></span>
                                                    </th:block>
                                                    <th:block
                                                            th:if="${warningVO.tagList != null and not #lists.isEmpty(warningVO.tagList)}"
                                                            th:each="tag : ${warningVO.tagList}">
                                                        <span class="layui-badge work-warning work-warning-tag"
                                                              th:style="|background-color: ${tag.bgColor}|"
                                                              th:text="${tag.tagName}"></span>
                                                    </th:block>
                                                </td>
                                            </tr>
                                        </th:block>
                                    </th:block>
                                    <tr>
                                        <td th:title="${detailVo.shardingNum}">工单号</td>
                                        <td>
                                            <span th:text="${detailVo.code}" id="code"></span>
                                            <a class="zmn-btn-text btn-copy" data-clipboard-target="#code">
                                                <i class="zmn-icon zmn-icon-clipboard-in"></i>
                                            </a>
                                            <a class="zmn-btn-text detail-distribute-list"
                                               th:if="${#authPermit.checkMenuPermit('/track/list.action')}">查看跟单</a>
                                            <a th:if="${detailVo.type == 1 &&
                                                   #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SUB_WORK_LIST_REFUND)}"
                                               class="zmn-btn-text detail-subworklist"
                                               th:data-original-id="${detailVo.orderId}"
                                               th:data-work-number="${detailVo.relationOrderWorkCountVO.refundOrderCount}"
                                               th:text="'退款单(' + ${detailVo.relationOrderWorkCountVO.refundOrderCount} + ')'"
                                               data-type="3">退款单
                                            </a>
                                            <a th:if="${detailVo.type == 1 &&
                                                   #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SUB_WORK_LIST_REWORK)}"
                                               class="zmn-btn-text detail-subworklist"
                                               th:data-original-id="${detailVo.orderId}"
                                               th:data-work-number="${detailVo.relationOrderWorkCountVO.reworkOrderCount}"
                                               th:text="'返修单(' + ${detailVo.relationOrderWorkCountVO.reworkOrderCount} + ')'"
                                               data-type="2">返修单
                                            </a>
                                            <a th:if="${detailVo.type == 1 &&
                                                   #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SUB_WORK_LIST_COMPENSATE)}"
                                               class="zmn-btn-text detail-subworklist"
                                               th:data-original-id="${detailVo.orderId}"
                                               th:data-work-number="${detailVo.relationOrderWorkCountVO.compensateOrderCount}"
                                               th:text="'赔偿单(' + ${detailVo.relationOrderWorkCountVO.compensateOrderCount} + ')'"
                                               data-type="4">赔偿单
                                            </a>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.bizType == 2}">
                                        <td>完成码</td>
                                        <td>
                                            <span th:text="${detailVo.completeCode}"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>状态结果</td>
                                        <td>
                                            <span th:text="|${detailVo.statusName} - ${detailVo.serviceCompleteReviewStatusName} - ${detailVo.resultStatusName}|"></span>
                                            <span th:if="${detailVo.member == 2 and detailVo.memberOrderVO != null}"
                                                  th:text="| - ${detailVo.memberOrderVO.reviewStatusName}|"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>工单类型</td>
                                        <td>
                                            <span th:text="|${detailVo.servCategName}-${detailVo.typeName}|"></span>
                                            <span th:if="${detailVo.sourceType != '4'}">
                                                    <span th:text="|- ${detailVo.sourceTypeName}|"></span>
                                                </span>
                                            <span th:if="${detailVo.sourceType == '4'}">
                                                    <span th:text="${detailVo.member == 2 ? ' - 延保订单' : ''}"></span>
                                                </span>
                                            <span th:if="${detailVo.balancePaymentLimitName != null}"
                                                  th:text="|-${detailVo.balancePaymentLimitName}|"></span>
                                            <span th:if="${detailVo.reworkId != null && detailVo.reworkId != 0}">-
                                                    <a class="detail-rework-id"
                                                       th:href="@{'/work/modify/detail.action?operateId=103&moduleId=' + ${moduleId} + '&workId=' + ${detailVo.reworkId} + '&orderId=' + ${detailVo.reworkId}}"
                                                       th:text="${detailVo.reworkId}"></a>
                                                    <span class="detail-rework-info">（点击查看返修源单详情）</span>
                                                </span>
                                            <span th:if="${detailVo.originalId != null && detailVo.type == 3}">-
                                                    <a class="detail-rework-id"
                                                       th:href="@{'/work/modify/detail.action?moduleId=' + ${moduleId} + '&workId=' + ${detailVo.originalId} + '&orderId=' + ${detailVo.originalId}}"
                                                       th:text="${detailVo.originalId}"></a>
                                                    <span class="detail-rework-info">（点击查看退款源单详情）</span>
                                                </span>
                                            <span th:if="${detailVo.duplicateId != null && detailVo.duplicateId != 0}">-
                                                    <a class="detail-rework-id"
                                                       th:href="@{'/work/modify/detail.action?moduleId=' + ${moduleId} + '&workId=' + ${detailVo.duplicateId} + '&orderId=' + ${detailVo.duplicateId}}"
                                                       th:text="${detailVo.duplicateId}"></a>
                                                    <span class="detail-rework-info">（点击查看重复源单详情）</span>
                                                </span>
                                            <span th:if="${detailVo.originalId != null && detailVo.type == 4}">-
                                                    <a class="detail-rework-id"
                                                       th:href="@{'/work/modify/detail.action?moduleId=' + ${moduleId} + '&workId=' + ${detailVo.originalId} + '&orderId=' + ${detailVo.originalId}}"
                                                       th:text="${detailVo.originalId}"></a>
                                                    <span class="detail-rework-info">（点击查看赔偿源单详情）</span>
                                                </span>
                                            <span th:if="${detailVo.originalId != null && detailVo.originalId != 0 && detailVo.type == 1}">-
                                                    <a class="detail-rework-id"
                                                       th:href="@{'/work/modify/detail.action?moduleId=' + ${moduleId} + '&workId=' + ${detailVo.originalId} + '&orderId=' + ${detailVo.originalId}}"
                                                       th:text="${detailVo.originalId}"></a>
                                                    <span class="detail-rework-info">（点击查看返修新单源单详情）</span>
                                                </span>
                                            <span th:if="${detailVo.workRelationVO != null && detailVo.workRelationVO.rootWorkId != 0 && detailVo.workRelationVO.type == 5}">-
                                                    <a class="detail-rework-id"
                                                       th:href="@{'/work/modify/detail.action?moduleId=' + ${moduleId} + '&workId=' + ${detailVo.workRelationVO.rootWorkId} + '&orderId=' + ${detailVo.workRelationVO.rootWorkId}}"
                                                       th:text="${detailVo.workRelationVO.rootWorkId}"></a>
                                                    <span class="detail-rework-info">（点击查看过保新单源单详情）</span>
                                                </span>
                                            <!--<span th:if="${detailVo.member == 2 and detailVo.memberOrderVO != null and detailVo.memberOrderVO.equityTypeName != null}" th:text="|-会员订单-${detailVo.memberOrderVO.equityTypeName}|"></span>-->

                                        </td>
                                    </tr>
                                    <tr>
                                        <td>服务信息</td>
                                        <td>
                                            <div th:each="item : ${detailVo.productList}">
                                                <p th:if="${item.productId == 0}"
                                                   th:text="|${item.showProductName}：${item.number}${item.productUnit}|"></p>
                                                <p th:unless="${item.productId == 0}"
                                                   th:text="|${item.showProductName}-${item.productName}：${item.number}${item.productUnit}|"></p>
                                                <p th:text="${item.faultInfo}"></p>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>常见备注</td>
                                        <td th:utext="${#stringUtil.replaceToBr(detailVo.commonRemark)}"></td>
                                    </tr>
                                    <tr>
                                        <td>下单备注</td>
                                        <td th:utext="${#stringUtil.replaceToBr(detailVo.remark)}"></td>
                                    </tr>
                                    <tr>
                                        <td>业务信息</td>
                                        <td th:text="|${#strings.defaultString(detailVo.bizTypeName, '')} - ${#strings.defaultString(detailVo.bizLineName, '')} - ${detailVo.servProductGroupName}|"></td>
                                    </tr>
                                    <tr th:if="${detailVo.userInfoVO != null and detailVo.userInfoVO.passId != null}">
                                        <td>下单用户</td>
                                        <td>
                                            <span th:text="|${detailVo.userInfoVO.userName} - ${detailVo.userInfoVO.genderName} - |"></span>
                                            <span id="hidMobile" class="hidMobile"
                                                  th:text="|${detailVo.userInfoVO.hidMobile}|"></span>
                                            <a class="zmn-btn-text btn-phone-copy"
                                               th:data-hidmobile="|${detailVo.userInfoVO.hidMobile}|"
                                               th:data-cryptomobile="|${detailVo.userInfoVO.cryptoMobile}|">
                                                <i class="zmn-icon zmn-icon-clipboard-in"></i>
                                            </a>
                                            <th:block
                                                    th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_USER_PHONE)}">
                                                <a class="zmn-btn-text btn-show-phone" data-target="#hidMobile"
                                                   data-type="2" data-index-phone="1">
                                                    <i class="layui-icon layui-icon-search"></i>
                                                </a>
                                            </th:block>
                                            <!-- 呼叫电话 -->
                                            <th:block
                                                    th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_CALL_PHONE) and detailVo.userInfoVO.mobile != null}">
                                                <a class="zmn-btn-text btn-cc-call layui-hide"
                                                   data-th-data-phone="${detailVo.userInfoVO.mobile}">
                                                    <i class="zmn-icon zmn-icon-phone1"></i>
                                                </a>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>联系人信息</td>
                                        <td th:text="|${detailVo.contactVO.contactName} - ${detailVo.contactVO.genderName}|"></td>
                                    </tr>
                                    <tr>
                                        <td>联系人电话</td>
                                        <td>
                                            <th:block
                                                    th:with="telephoneList=${detailVo.contactVO.telephoneList}, telephoneExtensionList=${detailVo.contactVO.telephoneExtensionList}, hidTelephoneList=${detailVo.contactVO.hidTelephoneList}, cryptoTelephoneList=${detailVo.contactVO.cryptoTelephoneList}">
                                                <div th:each="hidMobile, iterStat : ${hidTelephoneList}"
                                                     th:with="id = 'hidMobile' + ${iterStat.count}, cryptoMobile=${cryptoTelephoneList[iterStat.index]}, telephoneExtension=${telephoneExtensionList[iterStat.index]}">
                                                    <span th:id="${id}" class="hidMobile" th:text="${hidMobile}"></span>
                                                    <th:block th:if="${telephoneExtension != ''}"><span
                                                            th:text="|分机号：${telephoneExtension}|"></span></th:block>
                                                    <a class="zmn-btn-text btn-phone-copy"
                                                       th:data-hidmobile="${hidMobile}"
                                                       th:data-cryptomobile="${cryptoMobile}">
                                                        <i class="zmn-icon zmn-icon-clipboard-in"></i>
                                                    </a>

                                                    <th:block
                                                            th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_USER_PHONE)}">
                                                        <a class="zmn-btn-text btn-show-phone" th:data-target="|#${id}|"
                                                           data-type="1" th:data-index-phone="${iterStat.count}">
                                                            <i class="layui-icon layui-icon-search"></i>
                                                        </a>
                                                        <!-- 言而有信发短信 -->
                                                        <!--
                                                        <th:block th:if="${detailVo.platWork == #globalConsts.PLAT_MARK_YEYX and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SEND_SMS) and phone != null}">
                                                            <a class="zmn-btn-text btn-send-sms layui-hide" data-toggle="modal" data-target="#modal-sms-customer" data-th-data-phone-target="|#${id}|">
                                                                <i class="iconfont icon-zmn-duanxin"></i>
                                                            </a>
                                                        </th:block>
                                                        -->
                                                    </th:block>
                                                    <!-- 呼叫电话 -->
                                                    <th:block
                                                            th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_CALL_PHONE)}"
                                                            th:with="realPhone = ${telephoneList[iterStat.index]}">
                                                        <a class="zmn-btn-text btn-cc-call layui-hide"
                                                           data-th-data-phone="|${realPhone}|">
                                                            <i class="zmn-icon zmn-icon-phone1"></i>
                                                        </a>
                                                    </th:block>
                                                </div>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>小号号码</td>
                                        <td style="width: 100px">
                                            <th:block
                                                    th:with="bindTelephoneList = ${detailVo.contactVO.bindTelephoneList}">
                                                <div th:each="phone, iterStat : ${bindTelephoneList}">
                                                    <span th:text="${phone}"></span>
                                                    <th:block th:if="${iterStat.count == 1}">
                                                        <span style="margin-left: 5px">此小号为工程师与用户之间的小号</span>
                                                        <th:block
                                                                th:if="${detailVo.contactVO.bindTelephoneShowStateList!=null && detailVo.contactVO.bindTelephoneShowStateList.size()>0}">
                                                            <th:block
                                                                    th:if="${!detailVo.contactVO.bindTelephoneShowStateList.get(0)}">
                                                                <span style="margin-left: 5px">（工程师app显示中）</span>
                                                            </th:block>
                                                            <th:block
                                                                    th:if="${detailVo.contactVO.bindTelephoneShowStateList.get(0)}">
                                                                <span style="margin-left: 5px">（工程师APP隐藏中）</span>
                                                            </th:block>
                                                        </th:block>
                                                    </th:block>
                                                </div>
                                            </th:block>

                                            <th:block
                                                    th:if="${detailVo.contactVO.tempXnoList!=null && detailVo.contactVO.tempXnoList.size()>0}">
                                                <div th:each="phone, iterStat : ${detailVo.contactVO.tempXnoList}">
                                                    <span th:text="${phone}"></span>
                                                    <th:block th:with="index = ${iterStat.index}">
                                                            <span style="margin-left: 5px">此小号为<span
                                                                    th:text="${detailVo.contactVO.tempXnoOperatorList[index]}"></span>与用户之间的小号</span>
                                                    </th:block>
                                                </div>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>地址</td>
                                        <td>
                                            <div style="float: left">
                                                <span id="fullAddress" th:text="${detailVo.contactVO.fullAddress}"></span>
                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_USER_ADDRESS)}">
                                                    <a class="zmn-btn-text btn-show-phone" data-target="#fullAddress"
                                                       data-type="3">
                                                        <i class="layui-icon layui-icon-search"></i>
                                                    </a>
                                                    <a class="zmn-btn-text layui-hide">
                                                        <i class="zmn-icon zmn-icon-map"></i>
                                                    </a>
                                                </th:block>
                                            </div>
                                            <div style="float: left;width: 380px"
                                                 th:if="${detailVo.epidemicControlLevel != null && detailVo.epidemicControlLevel > 0}"
                                                 th:class="${detailVo.epidemicControlLevel == 1 ? 'epidemicOfOpen' : 'epidemicOfClose'}"
                                                 th:text="${detailVo.epidemicControlMsg}">
                                            </div>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.grid}">
                                        <td>网格</td>
                                        <td>
                                            <span th:text="${detailVo.gridInfo}"></span>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.communityInfo}">
                                        <td>小区</td>
                                        <td>
                                            <span th:text="${detailVo.communityInfo}"></span>
                                            <a class="zmn-btn-text detail-communityId">小区档案卡</a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>用户id</td>
                                        <td>
                                            <span name="userId" th:text="${detailVo.userId}"></span>
                                            <a class="zmn-btn-text detail-userId">用户档案卡</a>
                                            <a th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SUB_WORK_LIST_USER_NEW)}"
                                               class="zmn-btn-text detail-subworklist"
                                               th:data-user-id="${detailVo.userId}" data-type="1">用户新单记录</a>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.platWork != 0 and detailVo.platWork == #globalConsts.PLAT_MARK_ZMN}">
                                        <td>行政子公司</td>
                                        <td th:text="${detailVo.gridCompanyName}"></td>
                                    </tr>
                                    <tr th:if="${detailVo.platWork != 0 and detailVo.platWork == #globalConsts.PLAT_MARK_ZMN}">
                                        <td>行政服务商</td>
                                        <td>
                                            <th:block>
                                                <span th:text="${detailVo.gridManageCompanyName}"></span>
                                                <th:block
                                                        th:if="${detailVo.gridManageCompanyName != null and detailVo.gridManageCompanyName != ''}">
                                                        <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SERVICE_PHONE)}"
                                                              th:text="|-客服电话：${detailVo.gridManageCompanyServicePhone != null && detailVo.gridManageCompanyServicePhone != '' ? detailVo.gridManageCompanyServicePhone : '暂无'}|"></span>
                                                </th:block>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.platWork != 0}">
                                        <td>执行子公司</td>
                                        <td th:text="${detailVo.companyName}"></td>
                                    </tr>
                                    <tr th:if="${detailVo.platWork != 0}">
                                        <td>执行服务商</td>
                                        <td>
                                            <th:block>
                                                <span th:text="${detailVo.manageCompanyName}"></span>
                                                <th:block
                                                        th:if="${detailVo.manageCompanyName != null and detailVo.manageCompanyName != ''}">
                                                        <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SERVICE_PHONE)}"
                                                              th:text="|-客服电话：${detailVo.servicePhone != null && detailVo.servicePhone != '' ? detailVo.servicePhone : '暂无'}|"></span>
                                                </th:block>
                                            </th:block>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>下次联系</td>
                                        <!-- 退款单隐藏下次联系时间 -->
                                        <td>
                                            <th:block
                                                    th:unless="${detailVo.refundWorkId != null && detailVo.refundWorkId != 0}">
                                                <span th:text="${#dates.format(detailVo.nextContactTime, 'yy-MM-dd HH:mm:ss')}"></span>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>下单时间</td>
                                        <td>
                                            <th:block>
                                                <span th:text="${#dates.format(detailVo.receiveTime, 'yy-MM-dd HH:mm:ss')}"></span>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>当前预约</td>
                                        <!-- 退款单隐藏预约时间 -->
                                        <td>
                                            <th:block
                                                    th:unless="${detailVo.refundWorkId != null && detailVo.refundWorkId != 0}">
                                                <span th:text="${#dates.format(detailVo.dutyTime, 'yy-MM-dd HH:mm:ss')}"></span>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>首次预约</td>
                                        <!-- 退款单隐藏预约时间 -->
                                        <td>
                                            <th:block
                                                    th:if="${ detailVo.changeRecordVO != null and detailVo.changeRecordVO.firstDutyTime != null }">
                                                <span th:text="${#dates.format(detailVo.changeRecordVO.firstDutyTime, 'yy-MM-dd HH:mm:ss')}"></span>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.channelStatementCanTime != null}">
                                        <td>可结算时间</td>
                                        <td>
                                            <span th:text="${#dates.format(detailVo.channelStatementCanTime, 'yy-MM-dd HH:mm:ss')}"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>改约次数</td>
                                        <!-- 退款单隐藏预约时间 -->
                                        <td>
                                            <th:block
                                                    th:if="${ detailVo.changeRecordVO != null && detailVo.changeRecordVO.dutyTimeModifyCount != null}">
                                                <span th:text="${detailVo.changeRecordVO.dutyTimeModifyCount}"></span>
                                                <th:block th:if="${detailVo.changeRecordVO.dutyTimeModifyCount > 0 }">
                                                    （<span
                                                        th:if="${detailVo.changeRecordVO.platDutyTimeModifyCount > 0}"
                                                        th:text="|平台：${detailVo.changeRecordVO.platDutyTimeModifyCount} ，|"></span>
                                                    <span th:if="${detailVo.changeRecordVO.fcPopDutyTimeModifyCount > 0}"
                                                          th:text="|厂商：${detailVo.changeRecordVO.fcPopDutyTimeModifyCount} ，|"></span>
                                                    <span th:if="${detailVo.changeRecordVO.spPopDutyTimeModifyCount > 0}"
                                                          th:text="|服务商：${detailVo.changeRecordVO.spPopDutyTimeModifyCount} ，|"></span>
                                                    <span th:if="${detailVo.changeRecordVO.appDutyTimeModifyCount > 0}"
                                                          th:text="|工程师：${detailVo.changeRecordVO.appDutyTimeModifyCount} |"></span>）
                                                </th:block>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>发票</td>
                                        <td>
                                            <table class="nested-table" th:if="${detailVo.invoiceVO != null}">
                                                <tbody>
                                                <tr>
                                                    <td>抬头：</td>
                                                    <td th:text="${detailVo.invoiceVO.buyer}"></td>
                                                    <td>开票主体：</td>
                                                    <td th:text="${detailVo.invoiceVO.drawer}"></td>
                                                </tr>
                                                <tr>
                                                    <td>纳税人识别号：</td>
                                                    <td th:text="${detailVo.invoiceVO.buyerTaxNum}"></td>
                                                    <td>发票类型：</td>
                                                    <td th:text="${detailVo.invoiceVO.invoiceTypeName}"></td>
                                                </tr>
                                                <tr>
                                                    <td>公司电话：</td>
                                                    <td th:text="${detailVo.invoiceVO.buyerPhone}"></td>
                                                    <td>发票代码：</td>
                                                    <td th:text="${detailVo.invoiceVO.invoiceCode}"></td>
                                                </tr>
                                                <tr>
                                                    <td>邮箱号码：</td>
                                                    <td th:text="${detailVo.invoiceVO.receiveEmail}"></td>
                                                    <td>发票号码：</td>
                                                    <td th:text="${detailVo.invoiceVO.invoiceNum}"></td>
                                                </tr>
                                                <tr>
                                                    <td>快递单号：</td>
                                                    <td th:text="${detailVo.invoiceVO.expressCode}"></td>
                                                    <td>开票日期：</td>
                                                    <td th:text="${detailVo.invoiceVO.drawerTime}"></td>
                                                </tr>
                                                <tr>
                                                    <td>快递公司：</td>
                                                    <td th:text="${detailVo.invoiceVO.expressCompany}"></td>
                                                    <td>申请日期：</td>
                                                    <td th:text="${detailVo.invoiceVO.applyTime}"></td>
                                                </tr>
                                                <tr>
                                                    <td>税价合计：</td>
                                                    <td th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.invoiceVO.invoiceAmount)}"></td>
                                                    <td>状态：</td>
                                                    <td th:text="${detailVo.invoiceVO.statusName}"></td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr class="nested" th:if="${detailVo.userCommentVO != null}">
                                        <td>用户评价</td>
                                        <td>
                                            <div class="layui-inline">
                                                <ul class="layui-rate" style="padding: 0px;">
                                                    <li class="layui-inline"
                                                        th:each="item : ${#numbers.sequence(1, detailVo.userCommentVO.score)}">
                                                        <i class="layui-icon layui-icon-rate-solid"></i>
                                                    </li>
                                                </ul>
                                                <span class="layui-inline"
                                                      th:text="|${detailVo.userCommentVO.score}星|"></span>
                                            </div>
                                            <p>
                                                <span th:if="${detailVo.userCommentVO.storeName != null}"
                                                      th:text="|店铺名称：${detailVo.userCommentVO.storeName}，|"></span>
                                                <span th:if="${detailVo.userCommentVO.content != null}">评价内容：<span
                                                        th:text="${detailVo.userCommentVO.content}"></span></span>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr class="nested" th:if="${detailVo.channelCommentVO != null}">
                                        <td>渠道评价</td>
                                        <td>
                                            <div class="layui-inline">
                                                <ul class="layui-rate" style="padding: 0px;">
                                                    <li class="layui-inline"
                                                        th:each="item : ${#numbers.sequence(1, detailVo.channelCommentVO.score)}">
                                                        <i class="layui-icon layui-icon-rate-solid"></i>
                                                    </li>
                                                </ul>
                                                <span class="layui-inline"
                                                      th:text="|${detailVo.channelCommentVO.score}星|"></span>
                                            </div>
                                            <p>
                                                <span th:if="${detailVo.channelCommentVO.storeName != null}"
                                                      th:text="|店铺名称：${detailVo.channelCommentVO.storeName}，|"></span>
                                                <span th:if="${detailVo.channelCommentVO.content != null}">评价内容：<span
                                                        th:text="${detailVo.channelCommentVO.content}"></span></span>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>投诉</td>
                                        <td>
                                            <th:block
                                                    th:if="${detailVo.complaintVOList != null and not #lists.isEmpty(detailVo.complaintVOList)}">
                                                <p th:each="item : ${detailVo.complaintVOList}"
                                                   style="margin-bottom: 8px;">
                                                    <th:block
                                                            th:with="target = ${detailVo.platWork == #globalConsts.PLAT_MARK_YEYX ? 'yeyx' : (detailVo.platWork == #globalConsts.PLAT_MARK_ZMN ? 'zmn' : 'cnhb') }">
                                                        <th:block
                                                                th:with="targetURL = ${session['BFM-COMPLAIN'].value + '/chs/complain/list/index.action?tabIndex=0&plat='+detailVo.platWork+'&orderId=' + detailVo.code}">
                                                            <a class="layui-btn layui-btn-xs layui-bg-cyan"
                                                               target="_blank"
                                                               th:href="${targetURL}"
                                                               th:classappend="|zmn-complaint-level-${item.level}|"
                                                               th:text="${item.levelName}"></a>
                                                        </th:block>
                                                    </th:block>
                                                    <span th:if="${item.status eq 40 or item.status eq 41}"
                                                          th:text="${item.statusName}"></span>
                                                </p>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>异常</td>
                                        <td>
                                            <th:block
                                                    th:if="${detailVo.abnormalVOList != null and not #lists.isEmpty(detailVo.abnormalVOList)}">
                                                <div class="layui-btn-container">
                                                    <a class="layui-btn layui-btn-xs layui-bg-orange"
                                                       target="_blank"
                                                       th:href="|${session['BFM-ABNORMAL'].value}/abnor/abnormal/list.action?orderId=${detailVo.code}|"
                                                       th:each="item : ${detailVo.abnormalVOList}"
                                                       th:text="${item.categOneName}"></a>
                                                </div>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr class="nested"
                                        th:if="${detailVo.platWork == #globalConsts.PLAT_MARK_ZMN || detailVo.platWork == #globalConsts.PLAT_MARK_CNHB}">
                                        <td>保单收据</td>
                                        <td>
                                            <div th:if="${detailVo.warranty != null and detailVo.warranty.effectiveTime != null}">
                                                <th:block
                                                        th:each="warrProduct : ${detailVo.warranty.orderWarrantyProductList}"
                                                        th:if="${detailVo.warranty.orderWarrantyProductList != null and detailVo.warranty.type == 2 and (warrProduct.day > 0 || warrProduct.month > 0)}">
                                                    <p>
                                                        <span th:text="${detailVo.warranty.code != null and detailVo.warranty.code != '' ? detailVo.warranty.code : warrProduct.code}"></span>
                                                        <span th:if="${detailVo.warranty.type == 2}"
                                                              th:text="${warrProduct.inWarranty != null and warrProduct.inWarranty ? '保修期内' : '过期'}"></span>
                                                        <span th:text="${detailVo.warranty.grant != null and detailVo.warranty.grant ? '已领取' : '未领取'}"></span>
                                                        <span th:text="${detailVo.warranty.grantUserName}"></span>
                                                    </p>

                                                    <p th:text="|保修时间：${warrProduct.month != null ? warrProduct.month + '个月' : warrProduct.day + '天' }，${#dates.format(detailVo.warranty.effectiveTime, 'yyyy-MM-dd HH:mm:ss')} ~ ${#dates.format(warrProduct.expiredTime, 'yyyy-MM-dd HH:mm:ss')}|"></p>

                                                    <p>
                                                        <span>保修内容：</span>
                                                        <span th:each="fault : ${#jsons.parseArray(warrProduct.fault)}"
                                                              th:text="${fault.mapName}"></span>
                                                        <span th:if="${warrProduct.remark != null}"
                                                              th:text="${warrProduct.remark}"></span>
                                                    </p>
                                                </th:block>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>贴花照片</td>
                                        <td>
                                            <th:block th:if="${detailVo.appliqueImageAttachmentList != null}">
                                                <ul class="container-images">
                                                    <th:block
                                                            th:each="item, iterStat : ${detailVo.appliqueImageAttachmentList}">
                                                        <th:block th:if="${item.srcList == null}">
                                                            <li class="attachment-img">
                                                                <img th:src="${item.src}" th:alt="|${item.typeName}|">
                                                                <div class="attachment-img-review-status-name"
                                                                     th:classappend="${item.reviewStatus != null && item.reviewStatus == 1}? 'review-warn-highlight'"
                                                                     th:text="${item.reviewStatusName}"></div>
                                                            </li>
                                                        </th:block>
                                                        <th:block th:if="${item.srcList != null}"
                                                                  th:each="imageURL, stat : ${item.srcList}">
                                                            <li class="attachment-img">
                                                                <img th:src="${imageURL}" th:alt="|${item.typeName}|">
                                                                <div class="attachment-img-review-status-name"
                                                                     th:classappend="${item.reviewStatus != null && item.reviewStatus == 1}? 'review-warn-highlight'"
                                                                     th:text="${item.reviewStatusName}"></div>
                                                            </li>
                                                        </th:block>
                                                    </th:block>
                                                </ul>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.imageAttachmentList != null && detailVo.imageAttachmentList.size()>0}">
                                        <td>工程师拍照</td>
                                        <td>
                                            <ul class="container-images" id="masterImages">
                                                <th:block th:each="item, iterStat : ${detailVo.imageAttachmentList}">
                                                    <th:block th:if="${item.srcList == null}">
                                                        <li class="attachment-img">
                                                            <img th:src="${item.src}" th:alt="|${item.typeName}|">
                                                            <div class="attachment-img-review-status-name"
                                                                 th:classappend="${item.reviewStatus != null && item.reviewStatus == 1}? 'review-warn-highlight'"
                                                                 th:text="${item.reviewStatusName}"></div>
                                                            <div class="attachment-img-name"
                                                                 th:text="|${item.typeName}|"></div>
                                                        </li>
                                                    </th:block>
                                                    <th:block th:if="${item.srcList != null}"
                                                              th:each="imageURL, stat : ${item.srcList}">
                                                        <li class="attachment-img">
                                                            <img th:src="${imageURL}" th:alt="|${item.typeName}|">
                                                            <div class="attachment-img-review-status-name"
                                                                 th:classappend="${item.reviewStatus != null && item.reviewStatus == 1}? 'review-warn-highlight'"
                                                                 th:text="${item.reviewStatusName}"></div>
                                                            <div class="attachment-img-name"
                                                                 th:text="${item.typeName}"></div>
                                                        </li>
                                                    </th:block>
                                                </th:block>
                                            </ul>
                                        </td>
                                    </tr>
                                    <!-- 工单视频附件 -->
                                    <tr th:if="${detailVo.videoAttachmentList != null && detailVo.videoAttachmentList.size()>0}">
                                        <td>服务视频</td>
                                        <td>
                                            <th:block th:each="item, iterStat : ${detailVo.videoAttachmentList}">
                                                <div class="video-player">
                                                    <div class="v-player"
                                                         th:vpath="|${item.src}?x-oss-process=video/snapshot,t_10000,m_fast|"
                                                         th:ipath="${item.src}">
                                                        <img th:src="|${item.src}?x-oss-process=video/snapshot,t_10000,m_fast|"/>
                                                        <i class="layui-icon layui-icon-play videoed"></i>
                                                    </div>
                                                    <div class="vtitle">
                                                        <span th:text="${item.typeName}"></span>
                                                        <a class="zmn-btn-text" target="_blank" th:href="${item.src}"
                                                           th:download="|${detailVo.orderId}-${item.typeName}|">下载</a>
                                                    </div>
                                                </div>
                                            </th:block>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>下单合同</td>
                                        <td>
                                            <span th:text="|${detailVo.bizModeSourceName}|"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>服务合同</td>
                                        <td>
                                            <span th:text="|${detailVo.bizModeName}|"></span>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="layui-col-xs6 info-right">
                            <div class="grid-demo">
                                <table class="layui-table table-info" lay-skin="nob" lay-size="lg">
                                    <colgroup>
                                        <col width="80">
                                        <col>
                                    </colgroup>
                                    <tbody>
                                        <tr th:if="${detailVo.distributeWay != 0 }">
                                            <td>派单模式</td>
                                            <td>
                                                <span th:text="${ detailVo.distributeWay == 10 ? '平台直派':'服务商派单' }"></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>分发标识</td>
                                            <td>
                                                <th:block>
                                                    <span th:text="${ detailVo.grabType == 2 ? '抢单':'派单' }"></span>
                                                </th:block>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>主工程师</td>
                                            <td>
                                                <th:block th:each="master : ${detailVo.mainMasterVOList}">
                                                    <p>
                                                        <th:block th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                            <span th:text="|${#strings.defaultString(master.masterGroupName, '')}-${master.masterName}-${master.masterPhone}-V${master.hierarchyLevel}-${master.typeName}-${master.identityName}|"></span>
                                                        </th:block>
                                                        <th:block th:unless="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                            <span th:text="|${#strings.defaultString(master.masterGroupName, '')}-${master.masterName}-${#mobileUtil.formatHideTel(master.masterPhone)}-V${master.hierarchyLevel}-${master.typeName}-${master.identityName}|"></span>
                                                        </th:block>
                                                        <th:block th:if="${master.appOnline != null}">
                                                            <span th:text="|-${master.appOnline == 2 ? '在线':'离线'}|"></span>
                                                        </th:block>

                                                    <!-- 网络电话 -->
                                                    <th:block
                                                            th:if="${master.masterId != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_IMCALL)}">
                                                        <th:block
                                                                th:replace="~{common/otherTmpl :: netcallForMaster(master.masterId)}"/>
                                                    </th:block>
                                                    <!-- 呼叫电话 -->
                                                    <th:block
                                                            th:if="${master.masterPhone != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_CALL_PHONE)}">
                                                        <th:block
                                                                th:replace="~{common/otherTmpl :: callForCC(${master.masterPhone})}"/>
                                                    </th:block>
                                                    <th:block
                                                            th:if="${master.masterPhone != null and detailVo.platWork == #globalConsts.PLAT_MARK_YEYX and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SEND_SMS)}">
                                                        <a class="zmn-btn-text" data-toggle="modal"
                                                           data-target="#modal-sms-master"
                                                           data-th-data-mobile="${master.masterPhone}">
                                                            <i class="iconfont icon-zmn-duanxin"></i>
                                                        </a>
                                                    </th:block>
                                                </p>
                                                <p class="text-highlight" th:if="${master.billAmount != null}">
                                                    <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_BILL_AMOUNT)}"
                                                          th:text="|绩效基数金额：${#moneyUtil.parseToYuanStartWithUnit(master.billAmount)}|"></span>
                                                    <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_MASTER_REWARD)}"
                                                          th:text="|提成：${#moneyUtil.parseToYuanStartWithUnit(master.rewardAmount)}|"></span>
                                                </p>
                                            </th:block>
                                            <th:block
                                                    th:if="${detailVo.masterSupervisorId != null && detailVo.masterSupervisorId > 0}">
                                                <p>
                                                    主工程师主管：
                                                    <th:block
                                                            th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                        <span th:text="|${#strings.defaultString(detailVo.masterSupervisorName, '')}-${#strings.defaultString(detailVo.masterSupervisorPhone, '')}|"></span>
                                                    </th:block>
                                                    <th:block
                                                            th:unless="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                        <span th:text="|${#strings.defaultString(detailVo.masterSupervisorName, '')}-${#mobileUtil.formatHideTel(detailVo.masterSupervisorPhone)}|"></span>
                                                    </th:block>
                                                </p>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.slaveMasterVOList != null && detailVo.slaveMasterVOList.size() > 0}">
                                        <td>从工程师</td>
                                        <td>
                                            <th:block th:each="master : ${detailVo.slaveMasterVOList}">
                                                <p>
                                                    <th:block
                                                            th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                        <span th:text="|${#strings.defaultString(master.masterGroupName, '')}-${master.masterName}-${master.masterPhone}-V${master.hierarchyLevel}-${master.typeName}-${master.identityName}|"></span>
                                                    </th:block>
                                                    <th:block
                                                            th:unless="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                        <span th:text="|${#strings.defaultString(master.masterGroupName, '')}-${master.masterName}-${#mobileUtil.formatHideTel(master.masterPhone)}-V${master.hierarchyLevel}-${master.typeName}-${master.identityName}|"></span>
                                                    </th:block>
                                                    <th:block th:if="${master.appOnline != null}">
                                                        <span th:text="|-${master.appOnline == 2 ? '在线':'离线'}|"></span>
                                                    </th:block>
                                                    <th:block th:if="${master.starLevel != null}">
                                                        <span th:text="|-${master.starLevel}星|"></span>
                                                    </th:block>

                                                    <!-- 网络电话 -->
                                                    <th:block
                                                            th:if="${master.masterId != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_IMCALL)}">
                                                        <th:block
                                                                th:replace="~{common/otherTmpl :: netcallForMaster(master.masterId)}"/>
                                                    </th:block>
                                                    <!-- 呼叫电话 -->
                                                    <th:block
                                                            th:if="${master.masterPhone != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_CALL_PHONE)}">
                                                        <th:block
                                                                th:replace="~{common/otherTmpl :: callForCC(${master.masterPhone})}"/>
                                                    </th:block>
                                                    <th:block
                                                            th:if="${master.masterPhone != null and detailVo.platWork == #globalConsts.PLAT_MARK_YEYX and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SEND_SMS)}">
                                                        <a class="zmn-btn-text" data-toggle="modal"
                                                           data-target="#modal-sms-master"
                                                           data-th-data-mobile="${master.masterPhone}">
                                                            <i class="iconfont icon-zmn-duanxin"></i>
                                                        </a>
                                                    </th:block>
                                                </p>
                                                <p class="text-highlight" th:if="${master.billAmount != null}">
                                                    <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_BILL_AMOUNT)}"
                                                          th:text="|绩效基数金额：${#moneyUtil.parseToYuanStartWithUnit(master.billAmount)}|"></span>
                                                    <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_MASTER_REWARD)}"
                                                          th:text="|提成：${#moneyUtil.parseToYuanStartWithUnit(master.rewardAmount)}|"></span>
                                                </p>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>责任工程师</td>
                                        <td>
                                            <p th:if="${detailVo.liableMaster != null}">
                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                    <span th:text="|${detailVo.liableMaster.groupName}-${detailVo.liableMaster.masterName}-${detailVo.liableMaster.masterPhone}-V${detailVo.liableMaster.hierarchyLevel}|"></span>
                                                </th:block>
                                                <th:block
                                                        th:unless="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                    <span th:text="|${detailVo.liableMaster.groupName}-${detailVo.liableMaster.masterName}-${#mobileUtil.formatHideTel(detailVo.liableMaster.masterPhone)}-V${detailVo.liableMaster.hierarchyLevel}|"></span>
                                                </th:block>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>源工程师</td>
                                        <td>
                                            <p th:if="${detailVo.reworkOriginalMaster != null}">
                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                    <span th:text="|${detailVo.reworkOriginalMaster.masterGroupName}-${detailVo.reworkOriginalMaster.masterName}-${detailVo.reworkOriginalMaster.masterPhone}-V${detailVo.reworkOriginalMaster.hierarchyLevel}|"></span>
                                                </th:block>
                                                <th:block
                                                        th:unless="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_PHONE)}">
                                                    <span th:text="|${detailVo.reworkOriginalMaster.masterGroupName}-${detailVo.reworkOriginalMaster.masterName}-${#mobileUtil.formatHideTel(detailVo.reworkOriginalMaster.masterPhone)}-V${detailVo.reworkOriginalMaster.hierarchyLevel}|"></span>
                                                </th:block>

                                                <th:block
                                                        th:with="masterId = ${ detailVo.reworkOriginalMaster.masterId }, masterPhone = ${ detailVo.reworkOriginalMaster.masterPhone }">
                                                    <!-- 网络电话 -->
                                                    <th:block
                                                            th:if="${masterId != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_ENGINEER_IMCALL)}">
                                                        <th:block
                                                                th:replace="~{common/otherTmpl :: netcallForMaster(masterId)}"/>
                                                    </th:block>
                                                    <!-- 呼叫电话 -->
                                                    <th:block
                                                            th:if="${masterPhone != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_CALL_PHONE)}">
                                                        <th:block
                                                                th:replace="~{common/otherTmpl :: callForCC(${masterPhone})}"/>
                                                    </th:block>
                                                    <th:block
                                                            th:if="${masterPhone != null and detailVo.platWork == #globalConsts.PLAT_MARK_YEYX and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_SEND_SMS)}">
                                                        <a class="zmn-btn-text" data-toggle="modal"
                                                           data-target="#modal-sms-master"
                                                           data-th-data-mobile="${masterPhone}">
                                                            <i class="iconfont icon-zmn-duanxin"></i>
                                                        </a>
                                                    </th:block>
                                                </th:block>
                                            </p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>待自动派单</td>
                                        <td>
                                            <th:block>
                                                <span th:text="${ detailVo.isWaitAutoDistribute ? '是':'否' }"></span>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>改派次数</td>
                                        <td>
                                            <th:block>
                                                <span th:text="${ detailVo.changeRecordVO != null ? detailVo.changeRecordVO.distributeCount : 0 }"></span>
                                            </th:block>
                                        </td>
                                    </tr>

                                    <tr th:if="${detailVo.vasOrderId != null}">
                                        <td>增值订单</td>
                                        <td>
                                            <th:block>
                                                <span th:text="${ detailVo.vasOrderId }" id="vasOrderId"></span>
                                                <a class="zmn-btn-text btn-copy" data-clipboard-target="#vasOrderId">
                                                    <i class="zmn-icon zmn-icon-clipboard-in"></i>
                                                </a>
                                            </th:block>
                                        </td>
                                    </tr>

                                    <tr th:if="${detailVo.member == 2 and detailVo.memberOrderVO != null}">
                                        <td>工程师审核</td>
                                        <td>
                                            <ul class="container-images text-images" id="masterCheckImages"
                                                th:if="${detailVo.memberOrderVO != null}">
                                                <!-- 整机照片 -->
                                                <li th:if="${detailVo.memberOrderVO.masterDeviceImageSrc != null}">
                                                    <img th:src="${detailVo.memberOrderVO.masterDeviceImageSrc}"
                                                         th:alt="整机照片">
                                                    <span th:text="整机照片"></span>
                                                </li>
                                                <!-- 易碎贴照片 -->
                                                <li th:if="${detailVo.memberOrderVO.masterFragilePasteImageSrc != null}">
                                                    <img th:src="${detailVo.memberOrderVO.masterFragilePasteImageSrc}"
                                                         th:alt="易碎贴照片">
                                                    <span th:text="易碎贴照片"></span>
                                                </li>
                                                <!-- 铭牌照片 -->
                                                <li th:if="${detailVo.memberOrderVO.masterNameplateImageSrc != null}">
                                                    <img th:src="${detailVo.memberOrderVO.masterNameplateImageSrc}"
                                                         th:alt="铭牌照片">
                                                    <span th:text="铭牌照片"></span>
                                                </li>
                                            </ul>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.member == 2 and detailVo.memberOrderVO != null and detailVo.memberOrderVO.saleMasterName != null}">
                                        <td>销售工程师</td>
                                        <td>
                                                <span th:text="|${detailVo.memberOrderVO.saleMasterName}-${detailVo.memberOrderVO.saleMasterPhone}|">
                                                </span>
                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>服务项目</td>
                                        <td>
                                            <div th:each="productItem : ${detailVo.serviceItemList}">
                                                <p th:text="|${productItem.productName}:|"></p>
                                                <div style="text-indent: 1em">
                                                    <div th:each="serviceItem : ${productItem.serviceItemVOList}">
                                                        <p th:text="|${serviceItem.serviceItemName}x${serviceItem.number}  ${#moneyUtil.parseToYuanStartWithUnit(serviceItem.amount)}|"></p>
                                                        <p th:if="${serviceItem.serviceItemDetailVOList != null}"
                                                           style="text-indent: 2em">
                                                                <span th:each="itemDetail : ${serviceItem.serviceItemDetailVOList}">
                                                                    <block th:text="${itemDetail.itemCellName + #moneyUtil.parseToYuanStartWithUnit(itemDetail.cellPrice)}">，</block>
                                                                </span>
                                                        </p>
                                                        <!--                                                            <p th:if="${serviceItem.servicePrice !=null || serviceItem.partPrice != null || serviceItem.hourFee != null || serviceItem.trafficFee != null}" style="text-indent: 2em">-->
                                                        <!--                                                                <span th:if="${serviceItem.servicePrice !=null}" th:text="|技术服务费${#moneyUtil.parseToYuanStartWithUnit(serviceItem.servicePrice)}，|"></span>-->
                                                        <!--                                                                <span th:if="${serviceItem.partPrice !=null}" th:text="|配件包干费${#moneyUtil.parseToYuanStartWithUnit(serviceItem.partPrice)}，|"></span>-->
                                                        <!--                                                                <span th:if="${serviceItem.hourFee !=null}" th:text="|工时费${#moneyUtil.parseToYuanStartWithUnit(serviceItem.hourFee)}，|"></span>-->
                                                        <!--                                                                <span th:if="${serviceItem.trafficFee !=null}"-->
                                                        <!--                                                                      th:text="|交通费${#moneyUtil.parseToYuanStartWithUnit(serviceItem.trafficFee)}，|"></span>-->
                                                        <!--                                                                <span th:if="${serviceItem.checkFee !=null}"-->
                                                        <!--                                                                      th:text="|检测费${#moneyUtil.parseToYuanStartWithUnit(serviceItem.checkFee)}，|"></span>-->
                                                        <!--                                                                <span th:if="${serviceItem.technologyFee !=null}"-->
                                                        <!--                                                                      th:text="|工艺费${#moneyUtil.parseToYuanStartWithUnit(serviceItem.technologyFee)}，|"></span>-->
                                                        <!--                                                                <span th:if="${serviceItem.guaranteeFee !=null}"-->
                                                        <!--                                                                      th:text="|保修费${#moneyUtil.parseToYuanStartWithUnit(serviceItem.guaranteeFee)}|"></span>-->
                                                        <!--                                                            </p>-->
                                                    </div>
                                                    <p th:text="|总计：${#moneyUtil.parseToYuanStartWithUnit(productItem.serviceItemTotalAmount)}|"></p>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <!--                                            <td>订单金额</td>-->
                                        <td>原价</td>
                                        <td>
                                            <span th:text="${#moneyUtil.parseToYuanEndWithUnit(detailVo.originalAmount)}"></span>

                                            <th:block th:if="${detailVo.internalSettlementAmount !=null}">
                                                    <span class="detail-rework-info"
                                                          th:if="${#authPermit.checkPermit('/zs/work/detail/internal/settlement/amount.action')}"
                                                          th:text="|内部价：${#moneyUtil.parseToYuanStartWithUnit(detailVo.internalSettlementAmount)}|"></span>
                                            </th:block>

                                            <th:block th:if="${detailVo.externalSettlementAmount !=null}">
                                                    <span class="detail-rework-info"
                                                          th:if="${#authPermit.checkPermit('/zs/work/detail/external/settlement/amount.action')}"
                                                          th:text="|外部价：${#moneyUtil.parseToYuanStartWithUnit(detailVo.externalSettlementAmount)}|"></span>
                                            </th:block>
                                            <th:block
                                                    th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_PRICE_SELECT)}">
                                                <a class="zmn-btn-text detail-product-price">价格查询</a>
                                            </th:block>
                                        </td>
                                    </tr>

                                    <tr class="nested">
                                        <td>优惠</td>
                                        <td>
                                            <th:block th:if="${detailVo.discountVOList !=null}">
                                                <p th:each="discount : ${detailVo.discountVOList}">
                                                    <span th:text="|${discount.categName}-${discount.typeName}：${#moneyUtil.parseToYuanStartWithUnit(discount.amount)}|"></span>
                                                    <span th:if="${discount.sellAmount >0}"
                                                          th:text="| 售价：${#moneyUtil.parseToYuanStartWithUnit(discount.sellAmount)}|"></span>
                                                    <span th:if="${discount.couponCode != null}"
                                                          th:text="${discount.couponCode}"></span>

                                                    <th:block
                                                            th:if="${detailVo.platWork == #globalConsts.PLAT_MARK_ZMN}">
                                                        <span th:if="${discount.categ == 11 || discount.categ == 12 || discount.categ == 21 || discount.categ == 52}"
                                                              th:text="|优惠规则ID：${discount.sourceId}|"></span>
                                                        <span th:if="${discount.categ == 31 || discount.categ == 32 || discount.categ == 33 || discount.categ == 51 }"
                                                              th:text="|优惠券批次：${discount.sourceId}|"></span>

                                                        <th:block
                                                                th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_DISCOUNT_SHARING)}">
                                                            <a th:if="${discount.categ != 41}"
                                                               th:data-categ="${discount.categ}"
                                                               th:data-sourceid="${discount.sourceId}"
                                                               class="zmn-btn-text detail-sharing-discount">分摊规则</a>
                                                        </th:block>
                                                    </th:block>
                                                </p>
                                            </th:block>
                                            <p th:if="${detailVo.discountAmount != null}"
                                               th:text="|总优惠金额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.discountAmount)}|"></p>
                                            <span id="selectDiscount" class="zmn-btn-text" style="cursor: pointer;">优惠信息查询</span>
                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>支付优惠</td>
                                        <td>
                                            <th:block th:if="${detailVo.orderPayDiscountList !=null}">
                                                <p th:each="orderPayDiscount : ${detailVo.orderPayDiscountList}">
                                                    <span style="margin-right: 15px;"
                                                          th:text="|${#moneyUtil.parseToYuanStartWithUnit(orderPayDiscount.amount)}|"></span>
                                                    <span th:text="| 支付渠道：支付宝  券ID:${orderPayDiscount.code}|"></span>
                                                    <span th:text="|优惠规则：${orderPayDiscount.ruleId}|"></span>
                                                    <th:block
                                                            th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_DISCOUNT_SHARING)}">
                                                        <a th:data-categ="11"
                                                           th:data-sourceid="${orderPayDiscount.ruleId}"
                                                           class="zmn-btn-text detail-sharing-discount">分摊规则</a>
                                                    </th:block>
                                                </p>
                                            </th:block>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>订单收入</td>
                                        <td>
                                            <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.totalAmount)}"></span>
                                            <span>(订单收入 = 订单金额 - 优惠总额 - 支付优惠 - 退款金额 + 增值产品预售金额)</span>
                                        </td>
                                    </tr>
                                    <th:block th:if="${detailVo.partLoanVOList != null}">
                                        <tr class="nested">
                                            <td>预付配件费</td>
                                            <td>
                                                <p th:each="partLoan : ${detailVo.partLoanVOList}">
                                                    <span th:text="${#moneyUtil.parseToYuanStartWithUnit(partLoan.debtAmount)}"></span>
                                                    <!--                                                        <span th:if="${#strings.isEmpty(partLoan.repaymentTypeName)}"-->
                                                    <!--                                                              th:text="|${partLoan.payTypeName}转账 -|"></span>-->
                                                    <span th:text="|线下转账 -|"></span>
                                                    <!--                                                        <span th:if="${not #strings.isEmpty(partLoan.repaymentTypeName)}"-->
                                                    <!--                                                              th:text="|${partLoan.repaymentTypeName}转账 -|"></span>-->
                                                    <span th:text="|${partLoan.debtStatusName}|"></span>
                                                </p>
                                            </td>
                                        </tr>
                                    </th:block>
                                    <tr class="nested">
                                        <td>订单收入明细</td>
                                        <td>
                                            <table class="nested-table">
                                                <tbody>
                                                <tr>
                                                    <td>渠道代收金额：</td>
                                                    <td>
                                                        <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.channelPrepayAmount)}"></span>
                                                    </td>
                                                    <td>
                                                        　<span
                                                            th:text="${detailVo.channelPrepayAmountPayStatusName}"></span>
                                                    </td>
                                                    <td>
                                                        　<span th:text="${detailVo.channelPrepayAmountDetail}"></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>平台代收金额：</td>
                                                    <td>
                                                        <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.prepayAmount)}"></span>
                                                    </td>
                                                    <td>
                                                        　<span th:text="${detailVo.prepayAmountPayStatusName}"></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>定金：</td>
                                                    <td>
                                                        <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.depositAmount)}"></span>
                                                    </td>
                                                    <td>
                                                        　<span th:text="${detailVo.depositAmountPayStatusName}"></span>
                                                    </td>
                                                    <th:block
                                                            th:if="${detailVo.unDepositAmount != null and detailVo.unDepositAmount != 0}">
                                                        <td>
                                                            <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.unDepositAmount)}"></span>
                                                        </td>
                                                        <td>
                                                            　<span>未支付</span>
                                                        </td>
                                                    </th:block>
                                                </tr>
                                                <tr>
                                                    <td>进度款：</td>
                                                    <th:block
                                                            th:if="${detailVo.progressAmount != null and detailVo.progressAmount != 0}">
                                                        <td>
                                                            <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.progressAmount)}"></span>
                                                        </td>
                                                        <td>
                                                            　<span>已支付</span>
                                                        </td>
                                                    </th:block>
                                                    <th:block
                                                            th:if="${detailVo.unProgressAmount != null and detailVo.unProgressAmount != 0}">
                                                        <td>
                                                            <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.unProgressAmount)}"></span>
                                                        </td>
                                                        <td>
                                                            　<span>未支付</span>
                                                        </td>
                                                    </th:block>
                                                </tr>
                                                <tr>
                                                    <td>工程师收款金额：</td>
                                                    <td>
                                                        <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.masterAmount)}"></span>
                                                    </td>
                                                    <td>
                                                        　<span th:if="${detailVo.masterAmount!=null}"
                                                               th:text="${detailVo.masterAmountPayStatusName}"></span>
                                                    </td>
                                                    <td>
                                                        　<span
                                                            th:if="${detailVo.masterAmount!=null && detailVo.masterAmount < 0}"
                                                            th:text="'工程师收款 ＜0时，表示工单完成时会原路退回给用户的金额'"></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>上门费：</td>
                                                    <td>
                                                        <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.homeAmount)}"></span>
                                                    </td>
                                                    <td>
                                                        　<span th:if="${detailVo.homeAmount!=null}"
                                                               th:text="${detailVo.masterAmountPayStatusName}"></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>增值产品预售金额：</td>
                                                    <td>
                                                        <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.discountPrepayAmount)}"></span>
                                                        <th:block th:if="${detailVo.discountPrepayRefundAmount!=null}">
                                                            （已退款
                                                            <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.discountPrepayRefundAmount)}"></span>
                                                            ）
                                                        </th:block>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>退款金额：</td>
                                                    <td>
                                                        <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.refundAmount)}"></span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>赔偿金额：</td>
                                                    <td>
                                                        <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.compensateAmount)}"></span>
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>

                                    <tr class="nested"
                                        th:if="${detailVo.dmsMasterBonusMap != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_DMS_MASTER_BONUS)}">
                                        <td>垒多多分红</td>
                                        <td>
                                            <table class="nested-table">
                                                <tbody>
                                                <tr th:if="${detailVo.dmsMasterBonusMap.get(10) !=null }"
                                                    th:with="master=${detailVo.dmsMasterBonusMap.get(10)}">
                                                    <td>首单工程师： <span
                                                            th:text="|${master.masterSkillGroupName}-${master.masterName}-${master.masterMobile}|"></span>
                                                    </td>
                                                </tr>
                                                <tr th:if="${detailVo.dmsMasterBonusMap.get(10) !=null }"
                                                    th:with="master=${detailVo.dmsMasterBonusMap.get(10)}">
                                                    <td>首单工程师分红：<span
                                                            th:text="|${#moneyUtil.parseToYuanStartWithUnit(master.masterAmount)}-${master.statusName}|"></span>
                                                    </td>
                                                </tr>
                                                <tr th:if="${detailVo.dmsMasterBonusMap.get(20) !=null }"
                                                    th:with="master=${detailVo.dmsMasterBonusMap.get(20)}">
                                                    <td>上一单工程师： <span
                                                            th:text="|${master.masterSkillGroupName}-${master.masterName}-${master.masterMobile}|"></span>
                                                    </td>
                                                </tr>
                                                <tr th:if="${detailVo.dmsMasterBonusMap.get(20) !=null }"
                                                    th:with="master=${detailVo.dmsMasterBonusMap.get(20)}">
                                                    <td>上一单工程师分红：<span
                                                            th:text="|${#moneyUtil.parseToYuanStartWithUnit(master.masterAmount)}-${master.statusName}|"></span>
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>


                                    <tr>
                                        <td>渠道佣金</td>
                                        <td>
                                            <span th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.channelAmount)}"></span>
                                        </td>
                                    </tr>
                                    <!--<tr class="nested">
                                        <td>支付信息</td>
                                        <td>
                                            <table class="nested-table" th:if="${detailVo.payStatus!=null && detailVo.payStatus==4}">
                                                <tr>
                                                    <td>已支付</td>
                                                </tr>
                                            </table>
                                            <table class="nested-table" th:each="pay : ${detailVo.payList}">
                                                <tbody>
                                                    <tr>
                                                        <td>金额类型：</td>
                                                        <td >
                                                            <span th:text="|${pay.amountTypeName} - ${pay.payStatusName}|"></span>
                                                            <th:block th:if="${pay.duplicate == 2}">
                                                                <span>-【重复支付】</span>
                                                            </th:block>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>支付渠道：</td>
                                                        <td th:text="${pay.payChannelName}"></td>
                                                    </tr>
                                                    <tr>
                                                        <td>流水号：</td>
                                                        <td th:text="${pay.payOutTradeNo}"></td>
                                                    </tr>
                                                    <tr>
                                                        <td>支付时间：</td>
                                                        <td th:text="${#dates.format(pay.payTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                                                    </tr>
                                                    <tr th:if="${pay.payDistance != null}">
                                                        <td th:if="${pay.amountType == 13}">
                                                            定金支付距离：
                                                        </td>
                                                        <td th:if="${pay.amountType == 14}">
                                                            尾款支付距离：
                                                        </td>
                                                        <td><span th:text="${#mathUtil.div(pay.payDistance, 1000, 2)}"></span>km</td>
                                                    </tr>
                                                    <tr th:if="${pay.agentType != null}">
                                                        <td>代付：</td>
                                                        <td>
                                                            <block th:if="${pay.agentType==2}">
                                                                是
                                                            </block>
                                                            <block th:unless="${pay.agentType==2}">
                                                                否
                                                            </block>
                                                        </td>
                                                    </tr>

                                                    <tr th:if="${pay.imgs != null}">
                                                        <td>汇款凭证</td>
                                                        <td>
                                                            <ul class="container-images" id="voucherImages">
                                                                <li th:each="imageURL, imgIterStat : ${pay.imgs}">
                                                                    <th:block
                                                                            th:with="text = '照片' + ${imgIterStat.count}">
                                                                        <img th:src="${imageURL}" th:alt="${text}">
&lt;!&ndash;                                                                            <span th:text="${text}"></span>&ndash;&gt;
                                                                    </th:block>
                                                                </li>
                                                            </ul>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>-->
                                    <tr class="nested" th:if="${detailVo.commission != null}">
                                        <td>提成信息</td>
                                        <td>
                                            <table class="nested-table">
                                                <tbody>
                                                <tr th:if="${detailVo.haveSharingEstimate == 2}"><a
                                                        class="zmn-btn-text detail-sharing-estimate">分润预估</a></tr>
                                                <tr th:if="${detailVo.commission.spReserveAmount != null}">
                                                    <td>服务商提成：</td>
                                                    <td th:text="${#moneyUtil.parseToYuanStartWithUnit(detailVo.commission.spReserveAmount)}"></td>
                                                    <td><span
                                                            th:text="|${detailVo.commission.spReserveSettleStatusName}|"/>
                                                    </td>
                                                </tr>
                                                <th:block th:if="${detailVo.commission.engineerAccountResult != null}">
                                                    <tr th:each="engineer : ${detailVo.commission.engineerAccountResult}">
                                                        <td><span th:text="|工程师${engineer.engineerName}提成:|"/></td>
                                                        <td th:text="${#moneyUtil.parseToYuanStartWithUnit(engineer.reserveAmount)}"></td>
                                                        <td><span
                                                                th:text="|${detailVo.commission.spReserveSettleStatusName}|"/>
                                                        </td>
                                                    </tr>

                                                </th:block>

                                                </tbody>
                                            </table>

                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>退款信息</td>
                                        <td>
                                            <table class="nested-table" th:each="refund : ${detailVo.refundList}">
                                                <tbody>
                                                <tr>
                                                    <td>退款状态：</td>
                                                    <td th:text="|${refund.payStatusName}|"></td>
                                                </tr>
                                                <tr>
                                                    <td>审核结果：</td>
                                                    <block th:if="${refund.reviewStatus != null}">
                                                        <td th:switch="${refund.reviewStatus}">
                                                            <block th:case="1" th:text="'退款申请已提交，待主管审核'"></block>
                                                            <block th:case="2"
                                                                   th:text="${refund.reviewer+'同意退款，退款金额：'+#moneyUtil.parseToYuanStartWithUnit(refund.amount)}"></block>
                                                            <block th:case="3"
                                                                   th:text="${refund.reviewer+'拒绝退款，退款金额：'+#moneyUtil.parseToYuanStartWithUnit(refund.amount)}"></block>
                                                        </td>
                                                    </block>
                                                    <block th:unless="${refund.reviewStatus != null}">
                                                        <td>无需审核</td>
                                                    </block>
                                                </tr>
                                                <tr>
                                                    <td>退款方式 / 路径：</td>
                                                    <td>
                                                        <block th:if="${!#strings.isEmpty(refund.refundTypeName) && !#strings.isEmpty(refund.refundPathName)}"
                                                               th:text="${refund.refundTypeName + '/' + refund.refundPathName}"></block>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>退款金额：</td>
                                                    <td th:text="${#moneyUtil.parseToYuanStartWithUnit(refund.amount)}"></td>
                                                </tr>
                                                <tr>
                                                    <td>退款时间：</td>
                                                    <td th:text="${#dates.format(refund.payTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                                                </tr>
                                                <tr>
                                                    <td>流水号：</td>
                                                    <td th:text="${refund.payOutTradeNo}"></td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr class="nested" th:if="${detailVo.bizType == 2}">
                                        <td>厂商配件</td>
                                        <td>
                                            <table class="nested-table">
                                                <tbody>
                                                <th:block th:each="factoryPart : ${detailVo.factoryPartList}"
                                                          th:if="${detailVo.factoryPartList != null and detailVo.factoryPartList.size() > 0}">
                                                    <tr>
                                                        <td>
                                                            <!--
                                                            <th:block th:if="${conversionMap.containsKey(factoryPart.partId)}">
                                                                <span th:text="|${factoryPart.partFullName} :${#mathUtil.div(factoryPart.number, conversionMap.get(factoryPart.partId).scale ,4)} ${conversionMap.get(factoryPart.partId).unit}|"></span>
                                                            </th:block>
                                                            <th:block th:unless="${conversionMap.containsKey(factoryPart.partId)}">
                                                            </th:block>
                                                            -->
                                                            <span th:text="|${factoryPart.partFullName} :${factoryPart.number} ${factoryPart.unit}|"></span>
                                                        </td>
                                                    </tr>

                                                    <tr th:each="partPost : ${factoryPart.factoryPartPostList}">
                                                        <td>
                                                            <span th:text="|${partPost.postTypeName}  ${partPost.postStatusName}|"></span>
                                                        </td>
                                                    </tr>
                                                </th:block>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>内采配件</td>
                                        <td>
                                            <table class="nested-table">
                                                <tbody>

                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_IN_PART_COST_TOTAL_AMOUNT)}">
                                                    <tr th:if="${detailVo.inSourcingCostAmount != null and detailVo.inSourcingCostAmount > 0}">
                                                        <td th:text="|配件综合成本总额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.inSourcingCostAmount)}|"></td>
                                                    </tr>
                                                </th:block>

                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_IN_PART_SALES_TOTAL_AMOUNT)}">
                                                    <tr th:if="${detailVo.inSourcingAmount != null and detailVo.inSourcingAmount > 0}">
                                                        <td th:text="|配件销售总额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.inSourcingAmount)}|"></td>
                                                    </tr>
                                                </th:block>

                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_IN_PART_PURCHASE_TOTAL_AMOUNT)}">
                                                    <tr th:if="${detailVo.inSourcingPurchaseAmount != null and detailVo.inSourcingPurchaseAmount > 0}">
                                                        <td th:text="|配件采购总额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.inSourcingPurchaseAmount)}|"></td>
                                                    </tr>
                                                </th:block>

                                                <th:block th:each="masterPart : ${detailVo.inSourcingPartList}"
                                                          th:if="${detailVo.inSourcingPartList != null and detailVo.inSourcingPartList.size() > 0}">
                                                    <tr>
                                                        <td>
                                                            <span th:text="|工程师：${masterPart.masterName}|"></span>
                                                            <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_IN_PART_SALES_AMOUNT)}"
                                                                  th:text="|总额：${#moneyUtil.parseToYuanStartWithUnit(masterPart.amount)}|"></span>
                                                        </td>
                                                    </tr>

                                                    <tr th:each="part : ${masterPart.partList}">
                                                        <td>
                                                            <!--<th:block th:if="${conversionMap.containsKey(part.partId)}">
                                                                <span th:text="|${part.partFullName} :${#mathUtil.div(part.number, conversionMap.get(part.partId).scale ,4)}  ${conversionMap.get(part.partId).unit}|"></span>
                                                            </th:block>
                                                            <th:block th:unless="${conversionMap.containsKey(part.partId)}">-->
                                                            <span th:text="|${part.partFullName} :${part.number} ${part.unit}|"></span>
                                                            <!--</th:block>-->
                                                            <th:block
                                                                    th:if="${part.costPrice != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_IN_PART_COST_AMOUNT)}">
                                                                <span th:text="|配件综合成本总额：${#moneyUtil.parseToYuanStartWithUnit(#partMathUtil.amountMultiplyNumber(part.costPrice, part.number))}|"></span>
                                                            </th:block>

                                                            <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_IN_PART_SALES_AMOUNT)}"
                                                                  th:text="|配件销售总额：${#moneyUtil.parseToYuanStartWithUnit(#partMathUtil.amountMultiplyNumber(part.price, part.number))}|"></span>

                                                            <th:block
                                                                    th:if="${part.purchasePrice != null and #orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_IN_PART_PURCHASE_AMOUNT)}">
                                                                <span th:text="|配件采购总额：${#moneyUtil.parseToYuanStartWithUnit(#partMathUtil.amountMultiplyNumber(part.purchasePrice, part.number))}|"></span>
                                                            </th:block>
                                                            <!-- 支付方式 -->
                                                            <span th:text="|支付方式：${#orderPayConsts.getPartPayTypeName(part.payType)}|"></span>
                                                        </td>
                                                    </tr>
                                                </th:block>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>外报配件</td>
                                        <td>
                                            <table class="nested-table">
                                                <tbody>
                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_OUT_PART_COST_TOTAL_AMOUNT)}">
                                                    <tr th:if="${detailVo.outSourcingCostAmount != null and detailVo.outSourcingCostAmount > 0}">
                                                        <td th:text="|配件综合成本总额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.outSourcingCostAmount)}|"></td>
                                                    </tr>
                                                </th:block>
                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_OUT_PART_SALES_TOTAL_AMOUNT)}">
                                                    <tr th:if="${detailVo.outSourcingAmount != null and detailVo.outSourcingAmount > 0}">
                                                        <td th:text="|配件销售总额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.outSourcingAmount)}|"></td>
                                                    </tr>
                                                </th:block>

                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_OUT_PART_PURCHASE_TOTAL_AMOUNT)}">
                                                    <tr th:if="${detailVo.outSourcingPurchaseAmount != null and detailVo.outSourcingPurchaseAmount > 0}">
                                                        <td th:text="|配件采购总额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.outSourcingPurchaseAmount)}|"></td>
                                                    </tr>
                                                </th:block>

                                                <th:block th:each="masterPart : ${detailVo.outSourcingPartList}"
                                                          th:if="${detailVo.outSourcingPartList != null and detailVo.outSourcingPartList.size() > 0}">
                                                    <tr>
                                                        <td>
                                                            <span th:text="|工程师：${masterPart.masterName}|"></span>
                                                            <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_OUT_PART_SALES_AMOUNT)}"
                                                                  th:text="|总额：${#moneyUtil.parseToYuanStartWithUnit(masterPart.amount)}|"></span>
                                                        </td>
                                                    </tr>

                                                    <tr th:each="part : ${masterPart.partList}">
                                                        <td>
                                                            <!--
                                                            <th:block th:if="${conversionMap.containsKey(part.partId)}">
                                                                <span th:text="|${part.partFullName} :${#mathUtil.div(part.number, conversionMap.get(part.partId).scale ,4)}  ${conversionMap.get(part.partId).unit}|"></span>
                                                            </th:block>
                                                            <th:block th:unless="${conversionMap.containsKey(part.partId)}">
                                                            </th:block>
                                                            -->
                                                            <span th:text="|${part.partFullName} :${part.number} ${part.unit}|"></span>
                                                            <span class="text-highlight"
                                                                  th:text="${part.reimburseStatusName}"></span>
                                                            <th:block th:if="${part.declarePrice !=null}">
                                                                <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_OUT_PART_COST_AMOUNT)}"
                                                                      th:text="|申报金额：${#moneyUtil.parseToYuanStartWithUnit(part.declarePrice)}|"></span>
                                                            </th:block>

                                                            <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_OUT_PART_SALES_AMOUNT)}"
                                                                  th:text="|报销金额${#moneyUtil.parseToYuanStartWithUnit(#partMathUtil.amountMultiplyNumber(part.price, part.number))}|"></span>

                                                            <th:block th:if="${part.purchasePrice !=null}">
                                                                <span th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_OUT_PART_PURCHASE_AMOUNT)}"
                                                                      th:text="|配件采购总额：${#moneyUtil.parseToYuanStartWithUnit(#partMathUtil.amountMultiplyNumber(part.purchasePrice, part.number))}|"></span>
                                                            </th:block>

                                                        </td>
                                                    </tr>
                                                </th:block>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr class="nested">
                                        <td>订单杂项费用</td>
                                        <td>
                                            <table class="nested-table">
                                                <tbody>
                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_DELIVER_TOTAL_AMOUNT)}">
                                                    <tr th:if="${detailVo.deliverAmount != null and detailVo.deliverAmount > 0}">
                                                        <td th:text="|配件综合成本总额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.deliverAmount)}|"></td>
                                                    </tr>
                                                </th:block>
                                                <th:block
                                                        th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_DELIVER_AMOUNT)}">
                                                    <tr th:if="${detailVo.deliverAmount != null and detailVo.deliverAmount > 0}">
                                                        <td th:text="|配件销售总额：${#moneyUtil.parseToYuanStartWithUnit(detailVo.deliverAmount)}|"></td>
                                                    </tr>
                                                    <th:block th:each="masterPart : ${detailVo.deliverList}"
                                                              th:if="${detailVo.deliverList != null and detailVo.deliverList.size() > 0}">
                                                        <tr>
                                                            <td>
                                                                <span th:text="|工程师：${masterPart.masterName}|"></span>
                                                                <span th:text="|总额：${#moneyUtil.parseToYuanStartWithUnit(masterPart.amount)}|"></span>
                                                            </td>
                                                        </tr>

                                                        <tr th:each="part : ${masterPart.partList}">
                                                            <td>
                                                                <span th:text="${part.partFullName}"></span>
                                                                <span class="text-highlight"
                                                                      th:text="${part.reimburseStatusName}"></span>
                                                                <th:block th:if="${part.declarePrice !=null}">
                                                                    <span th:text="|申报金额：${#moneyUtil.parseToYuanStartWithUnit(part.declarePrice)}|"></span>
                                                                </th:block>
                                                                <span th:text="|报销金额：${#moneyUtil.parseToYuanStartWithUnit(#partMathUtil.amountMultiplyNumber(part.price, part.number))}|"></span>
                                                            </td>
                                                        </tr>
                                                    </th:block>

                                                </th:block>

                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td th:if="${detailVo.orderFactory == null}">下单渠道</td>
                                        <td th:if="${detailVo.orderFactory != null}">厂商</td>
                                        <td>
                                            <span th:text="|${detailVo.channelTwoName}/${detailVo.channelTwoId}|"></span>
                                            - <span th:text="|${detailVo.channelName}/${detailVo.channelId}|"></span>
                                            <span th:if="${#strings.isEmpty(detailVo.abutmenterName)}"
                                                  th:text="'（运营责任人：--）'"></span>
                                            <span th:unless="${#strings.isEmpty(detailVo.abutmenterName)}"
                                                  th:text="${'（运营责任人：'+detailVo.abutmenterName+'）'}"></span>
                                            <span th:unless="${#strings.isEmpty(detailVo.promotionBrand)}"
                                                  th:text="${'（推广品牌：'+detailVo.promotionBrand+'）'}"></span>
                                            <span th:if="${detailVo.outerId != null and detailVo.outerId != ''}">
                                                        - <span th:text="${detailVo.outerId}" id="outerId"></span>
                                                        <a class="zmn-btn-text btn-copy"
                                                           data-clipboard-target="#outerId">
                                                            <i class="zmn-icon zmn-icon-clipboard-in"></i>
                                                        </a>
                                                </span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>来源渠道</td>
                                        <td>
                                            <span th:text="|${detailVo.sourceChannelTwoName}/${detailVo.sourceChannelTwoId}|"></span>
                                            - <span
                                                th:text="|${detailVo.sourceChannelName}/${detailVo.sourceChannelId}|"></span>
                                            <span th:unless="${#strings.isEmpty(detailVo.promotionBrand)}"
                                                  th:text="${'（推广品牌：'+detailVo.promotionBrand+'）'}"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>入口</td>
                                        <td>
                                            <span th:text="${detailVo.receiveEntranceName}"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>下单平台</td>
                                        <td>
                                            <span th:text="${detailVo.platName}"></span>
                                        </td>
                                    </tr>
                                    <tr th:if="${detailVo.orderShopVO != null}">
                                        <td>店铺</td>
                                        <td>
                                                <span th:text="|${detailVo.orderShopVO.shopName}|">
                                                </span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>服务平台</td>
                                        <td>
                                            <span th:text="${detailVo.platWorkName}"></span>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section th:if="${detailVo.visitVOList != null and detailVo.visitVOList.size() > 0}">
                <h3>上门记录</h3>
                <div class="layui-row">
                    <table class="layui-table table-log table-center">
                        <thead>
                        <tr>
                            <th>提交时间</th>
                            <th>类型</th>
                            <th>预计上门时间</th>
                            <th>出发时间</th>
                            <th>实际上门时间</th>
                            <th>工程师</th>
                            <th>子状态</th>
                            <th>照片</th>
                            <th>备注</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="visit : ${detailVo.visitVOList}">
                            <td th:text="${#dates.format(visit.createTime, 'yy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${visit.visitTypeName}"></td>
                            <td th:text="${#dates.format(visit.expectVisitTime, 'yy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${#dates.format(visit.setOutTime, 'yy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${#dates.format(visit.actualVisitTime, 'yy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${visit.masterName}"></td>
                            <td th:text="${visit.visitStatusName}"></td>
                            <td th:utext="${#stringUtil.replaceToBr(visit.imgSrc)}"></td>
                            <td th:text="${visit.remark}"></td>
                            <td>
                                <th:block th:if="${visit.visitStatus != 10 && visit.visitStatus != 20}">
                                    <span style="color: #D7D7D7">取消</span>
                                </th:block>
                                <th:block th:if="${visit.visitStatus == 10 || visit.visitStatus == 20}">
                                    <span name="detail-visit" style="color: blue;cursor: pointer;"
                                          data-th-data-visit-id="${ visit.visitId }">取消</span>
                                </th:block>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </section>

            <section th:if="${detailVo.payList != null and detailVo.payList.size() > 0}">
                <h3>收费明细</h3>
                <div class="layui-row">
                    <table class="layui-table table-log table-center">
                        <thead>
                        <tr>
                            <th>支付时间</th>
                            <th>支付流水号</th>
                            <th>金额类型</th>
                            <th>金额</th>
                            <th>支付方式</th>
                            <th>支付渠道</th>
                            <th>支付人</th>
                            <th>支付状态</th>
                            <th>支付距离</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="pay : ${detailVo.payList}">
                            <td th:text="${#dates.format(pay.payTime, 'yy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${pay.payOutTradeNo}"></td>
                            <td th:text="|${pay.amountTypeName}${pay.duplicate == 2 ? '（重复支付）' : '' }|"></td>
                            <td th:text="${#moneyUtil.parseToYuanStartWithUnit(pay.amount)}"></td>
                            <td th:text="${pay.payTypeName}"></td>
                            <td th:text="${pay.payChannelName}"></td>
                            <td th:text="${pay.payType == 2 ? '工程师' : '用户'}"></td>
                            <td th:text="${pay.payStatusName}"></td>
                            <td><span
                                    th:text="|${pay.payDistance != null ? #mathUtil.div(pay.payDistance, 1000, 2) + 'km' : '-'}|"></span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </section>

            <section>
                <th:block th:if="${detailVo.orderFactory != null}">
                    <h3>渠道/厂商说明</h3>
                </th:block>
                <th:block th:if="${detailVo.orderFactory == null}">
                    <h3>渠道规模/用途描述</h3>
                </th:block>
                <div class="layui-row">
                    <table class="layui-table table-log">
                        <tr>
                            <td>
                                <span th:text="${detailVo.channelDescription}"></span>
                            </td>
                        </tr>
                    </table>
                </div>
            </section>

            <section
                    th:if="${#strings.isEmpty(detailVo.inviteCommentPlat) && #strings.isEmpty(detailVo.finalPaymentPayPlat)?false:true}">
                <div class="layui-row">
                    <table class="layui-table table-log">
                        <thead>
                        <tr>
                            <th>渠道相关说明</th>
                            <th>对应平台</th>
                            <th>详情</th>
                        </tr>
                        </thead>
                        <tbody>
                        <th:block th:if="${!#strings.isEmpty(detailVo.inviteCommentPlat)}">
                            <tr>
                                <td>渠道邀评</td>
                                <td><span th:text="${detailVo.inviteCommentPlat}"></span></td>
                                <td>
                                    <th:block th:if="${detailVo.inviteCommentExplain != null}">
                                        <a class="zmn-btn-text channel-order-conf-detail-invite">查看</a>
                                    </th:block>
                                </td>
                            </tr>
                        </th:block>
                        <th:block th:if="${!#strings.isEmpty(detailVo.finalPaymentPayPlat)}">
                            <tr>
                                <td>渠道尾款支付</td>
                                <td><span th:text="${detailVo.finalPaymentPayPlat}"></span></td>
                                <td>
                                    <th:block th:if="${detailVo.finalPayExplain != null}">
                                        <a class="zmn-btn-text channel-order-conf-detail-pay">查看</a>
                                    </th:block>
                                </td>
                            </tr>
                        </th:block>
                        </tbody>
                    </table>
                </div>
            </section>

            <section th:if="${detailVo.orderPostVOList != null and detailVo.orderPostVOList.size() > 0}">
                <h3>快递记录</h3>
                <div class="layui-row">
                    <table class="layui-table table-log">
                        <thead>
                        <tr>
                            <th>物流单号</th>
                            <th>物流公司</th>
                            <th>收件人</th>
                            <th>收货地址</th>
                            <th>当前状态</th>
                            <th>更新时间</th>
                            <th>类型</th>
                            <th>快递备注</th>
                            <th>物流详情</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="orderPost : ${detailVo.orderPostVOList}">
                            <td th:text="${orderPost.expressCode}"></td>
                            <td th:text="${orderPost.expressCompany}"></td>
                            <td th:text="${orderPost.receiver}"></td>
                            <td th:text="${orderPost.receiveAddress}"></td>
                            <td th:text="${orderPost.statusName}"></td>
                            <td th:text="${#dates.format(orderPost.updateTime, 'yy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${orderPost.itemTypeName}"></td>
                            <td th:text="${orderPost.remark}"></td>
                            <td><a class="zmn-btn-text detail-express"
                                   data-th-data-express="${ orderPost.expressData }">查看</a></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </section>

            <section th:if="${detailVo.orderMemberReviewVO != null and detailVo.orderMemberReviewVO.reviewStatus > 2}">
                <h3>审核信息</h3>
                <div class="layui-row">
                    <table class="layui-table table-log">
                        <thead>
                        <tr>
                            <th width="100">审核类型</th>
                            <th width="450">审核内容</th>
                            <th>审核结果</th>
                            <th>审核备注</th>
                            <th width="150">审核时间</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td rowspan="3">工程师审核</td>
                            <td>
                                    <span class="layui-inline" style="margin-left: 35px;width: 80px;">
                                        整机照片:
                                    </span>
                                <span class=" platreview-img-member">
                                        <img th:src="${detailVo.orderMemberReviewVO.userFragilePasteImageSrc}"
                                             alt="注册照片">
                                    </span>
                                <span class=" platreview-space"></span>
                                <span>
                                        <img th:src="${detailVo.orderMemberReviewVO.masterDeviceImageSrc}" alt="工程师拍照">
                                    </span>
                            </td>
                            <td>
                                <span th:if="${detailVo.orderMemberReviewVO.masterReviewDeviceResult == 2 }">通过</span>
                                <span th:if="${detailVo.orderMemberReviewVO.masterReviewDeviceResult == 3 }"
                                      style="font-family: red">失败</span>
                            </td>
                            <td th:text="${detailVo.orderMemberReviewVO.masterReviewRemark}" rowspan="3"></td>
                            <td th:text="${#dates.format(detailVo.orderMemberReviewVO.masterReviewTime, 'yyyy-MM-dd HH:mm:ss')}"
                                rowspan="3"></td>
                        </tr>
                        <tr>
                            <td>
                                    <span class="layui-inline" style="margin-left: 35px;width: 80px;">
                                        铭牌照片:
                                    </span>
                                <span class=" platreview-img-member">
                                        <img th:src="${detailVo.orderMemberReviewVO.userNameplateImageSrc}" alt="注册照片">
                                    </span>
                                <span class=" platreview-space"></span>
                                <span>
                                        <img th:src="${detailVo.orderMemberReviewVO.masterNameplateImageSrc}"
                                             alt="工程师拍照">
                                    </span>
                            </td>
                            <td>
                                <span th:if="${detailVo.orderMemberReviewVO.masterReviewNameplateResult == 2 }">通过</span>
                                <span th:if="${detailVo.orderMemberReviewVO.masterReviewNameplateResult == 3 }"
                                      style="font-family: red">失败</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                    <span class="layui-inline" style="margin-left: 35px;width: 80px;">
                                        贴花照片:
                                    </span>
                                <span class=" platreview-img-member">
                                        <img th:src="${detailVo.orderMemberReviewVO.userFragilePasteImageSrc}"
                                             alt="注册照片">
                                    </span>
                                <span class=" platreview-space"></span>
                                <span>
                                        <img th:src="${detailVo.orderMemberReviewVO.masterFragilePasteImageSrc}"
                                             alt="工程师拍照">
                                    </span>
                            </td>
                            <td>
                                <span th:if="${detailVo.orderMemberReviewVO.masterReviewFragilePasteResult == 2 }">通过</span>
                                <span th:if="${detailVo.orderMemberReviewVO.masterReviewFragilePasteResult == 3 }"
                                      style="font-family: red">失败</span>
                            </td>
                        </tr>
                        <tr>
                            <td rowspan="4">后台审核</td>
                            <td>
                                    <span class="layui-inline" style="margin-left: 35px;width: 80px;">
                                        整机照片:
                                    </span>
                                <span class=" platreview-img-member">
                                        <img th:src="${detailVo.orderMemberReviewVO.userFragilePasteImageSrc}"
                                             alt="注册照片">
                                    </span>
                                <span class=" platreview-space"></span>
                                <span>
                                        <img th:src="${detailVo.orderMemberReviewVO.masterDeviceImageSrc}" alt="工程师拍照">
                                    </span>
                            </td>
                            <td>
                                <span th:if="${detailVo.orderMemberReviewVO.platReviewDeviceResult == 2 }">通过</span>
                                <span th:if="${detailVo.orderMemberReviewVO.platReviewDeviceResult == 3 }"
                                      style="font-family: red">失败</span>
                            </td>
                            <td th:text="${detailVo.orderMemberReviewVO.platReviewRemark}" rowspan="4"></td>
                            <td th:text="${#dates.format(detailVo.orderMemberReviewVO.platReviewTime, 'yyyy-MM-dd HH:mm:ss')}"
                                rowspan="4"></td>
                        </tr>
                        <tr>
                            <td>
                                    <span class="layui-inline" style="margin-left: 35px;width: 80px;">
                                        铭牌照片:
                                    </span>
                                <span class=" platreview-img-member">
                                        <img th:src="${detailVo.orderMemberReviewVO.userNameplateImageSrc}" alt="注册照片">
                                    </span>
                                <span class=" platreview-space"></span>
                                <span>
                                        <img th:src="${detailVo.orderMemberReviewVO.masterNameplateImageSrc}"
                                             alt="工程师拍照">
                                    </span>
                            </td>
                            <td>
                                <span th:if="${detailVo.orderMemberReviewVO.platReviewNameplateResult == 2 }">通过</span>
                                <span th:if="${detailVo.orderMemberReviewVO.platReviewNameplateResult == 3 }"
                                      style="font-family: red">失败</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                    <span class="layui-inline" style="margin-left: 35px;width: 80px;">
                                        贴花照片:
                                    </span>
                                <span class=" platreview-img-member">
                                        <img th:src="${detailVo.orderMemberReviewVO.userFragilePasteImageSrc}"
                                             alt="注册照片">
                                    </span>
                                <span class=" platreview-space"></span>
                                <span>
                                        <img th:src="${detailVo.orderMemberReviewVO.masterFragilePasteImageSrc}"
                                             alt="工程师拍照">
                                    </span>
                            </td>
                            <td>
                                <span th:if="${detailVo.orderMemberReviewVO.platReviewFragilePasteResult == 2 }">通过</span>
                                <span th:if="${detailVo.orderMemberReviewVO.platReviewFragilePasteResult == 3 }"
                                      style="font-family: red">失败</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </section>

            <section th:if="${detailVo.trackVOList != null and detailVo.trackVOList.size() > 0}">
                <h3>跟单记录</h3>
                <div class="layui-row">
                    <table class="layui-table table-log">
                        <thead>
                        <tr>
                            <th width="130">操作时间</th>
                            <th width="80">操作员</th>
                            <th>跟单问题</th>
                            <th>跟单等级</th>
                            <th width="130">完成时间</th>
                            <th width="80">完成操作员</th>
                            <th>跟单结果</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="track : ${detailVo.trackVOList}">
                            <td th:text="${#dates.format(track.createTime, 'yy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${track.addUserName}"></td>
                            <td th:text="${track.mapName + ';' + (#strings.defaultString(track.remark, ''))}"></td>
                            <td th:text="|${track.level}级|"></td>
                            <td th:text="${#dates.format(track.completeTime, 'yy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${track.completeUserName}"></td>
                            <td th:text="${track.resultContent}"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </section>

            <section th:if="${detailVo.nonstandardVO != null }">
                <h3>非标信息</h3>
                <div class="layui-row">
                    <table class="layui-table table-log">
                        <thead>
                        <tr>
                            <th width="104">信息名称</th>
                            <th width="150">信息内容</th>
                            <th width="50">图片</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td colspan="2" style="padding: 0">
                                <table class="layui-table table-log">
                                    <tbody>
                                    <tr th:each="nonstandard : ${detailVo.nonstandardVO.orderNonstandardList}">
                                        <td width="100" th:text="${nonstandard.title}"></td>
                                        <td width="150" th:text="${nonstandard.content}"></td>
                                    </tr>
                                    </tbody>
                                </table>
                            </td>
                            <td>
                                <table class="layui-table table-log">
                                    <tbody>
                                    <tr th:each="img : ${detailVo.nonstandardVO.imgList}">
                                        <img style="margin-left: 35px;width: 80px;" th:src="${img}">
                                    </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </section>

            <section th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_OPERATOR)}">
                <h3>操作记录</h3>
                <div class="layui-row row-content" th:if="${detailVo.logStatList != null}">
                    <th:block th:each="logStat : ${detailVo.logStatList}">
                        <div th:if="${logStat.operatorType == 0}" th:text="|操作记录总数：${logStat.operateCount}|"></div>
                        <div th:if="${logStat.operatorType != 0}"
                             th:text="|${logStat.operatorTypeName}操作记录数：${logStat.operateCount}|"></div>
                    </th:block>
                </div>
                <div class="layui-row">
                    <div class="layui-tab layui-tab-card" lay-filter="tabChange" id="log-tab">
                        <ul class="layui-tab-title">
                        </ul>
                        <div class="layui-tab-content" id="log-tab-div">
                            <table class="layui-table table-log">
                                <thead>
                                <tr>
                                    <th width="130">操作时间</th>
                                    <th width="80">操作</th>
                                    <th>操作内容</th>
                                    <th width="150">状态变更</th>
                                    <th width="150" id="resultEdit">结果变更</th>
                                    <th width="100">操作员</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="log : ${detailVo.logList}" th:data-type="${log.type}">
                                    <td th:text="${#dates.format(log.createTime, 'yy-MM-dd HH:mm:ss')}"></td>
                                    <td th:text="${log.typeName}"></td>
                                    <td th:utext="${#stringUtil.replaceToBr(log.content)}"></td>
                                    <td th:text="|${#strings.defaultString(log.beforeStatusName, '')}->${#strings.defaultString(log.afterStatusName, '')}|"></td>
                                    <td th:if="${log.beforeResultStatusName != null}"
                                        th:text="|${#strings.defaultString(log.beforeResultStatusName, '')}->${#strings.defaultString(log.afterResultStatusName, '')}|"></td>
                                    <td th:unless="${log.beforeResultStatusName != null}" style="text-align: center">—
                                    </td>
                                    <td th:text="|${log.operator}|"></td>
                                </tr>
                                <!--<tr th:each="log : ${detailVo.trackLogList}" data-type="200">
                                    <td th:text="${#dates.format(log.createTime, 'yy-MM-dd HH:mm:ss')}"></td>
                                    <td th:text="${log.typeName}"></td>
                                    <td th:utext="${#stringUtil.replaceToBr(log.content)}"></td>
                                    <td th:text="|${#strings.defaultString(log.beforeStatusName, '')}->${#strings.defaultString(log.afterStatusName, '')}|"></td>
                                    <td></td>
                                    <td th:text="|${log.operator}|"></td>
                                </tr>-->
                                <tr class="no-data"
                                    th:styleappend="${#arrays.length(detailVo.logList) > 0} ? 'display: none'">
                                    <td colspan="6" th:text="暂无操作记录" style="text-align: center"></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>

                        <div class="layui-tab-content" id="video-tab-div" style="display: none">
                            <table class="layui-table">
                                <thead>
                                <tr>
                                    <th width="130">视频播放次数</th>
                                    <th width="80">视频名称</th>
                                    <th width="100">播放时长 （单位:秒）</th>
                                    <th width="150">触发方式</th>
                                    <th width="150">播放开始时间</th>
                                    <th width="100">播放结束时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="record : ${detailVo.cmsVideoRecord}">
                                    <td th:text="${record.videoPlayNumber}"></td>
                                    <td th:text="${record.videoName}"></td>
                                    <td th:text="${record.playTime}"></td>
                                    <td th:text="${record.triggerWay}"></td>
                                    <td th:text="${#dates.format(record.playStartDate, 'yy-MM-dd HH:mm:ss')}"></td>
                                    <td th:text="${#dates.format(record.playEndDate, 'yy-MM-dd HH:mm:ss')}"></td>
                                </tr>

                                <tr class="no-data"
                                    th:styleappend="${not  #arrays.isEmpty(detailVo.cmsVideoRecord)} ? 'display: none'">
                                    <td colspan="6" th:text="暂无记录" style="text-align: center"></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>

                    </div>
                </div>
            </section>

            <section
                    th:if="${#orderAuthPermit.checkDetailPermit(moduleId, #orderPremissionConsts.ODP_CHANNEL_DOCKING)}">
                <section th:if="${detailVo.dockingLogList != null}">
                    <h3>渠道接口交互记录</h3>
                    <div class="layui-row">
                        <table class="layui-table table-log">
                            <thead>
                            <tr>
                                <th width="130">开始时间</th>
                                <th width="130">方向</th>
                                <th width="80">操作</th>
                                <th width="80">结果</th>
                                <th width="80">错误信息</th>
                                <th>操作内容</th>
                                <th width="150">请求参数</th>
                                <th width="150">响应结果</th>
                                <th width="130">结束时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="log : ${detailVo.dockingLogList}">
                                <td th:text="${log.beginTimeStr}"></td>
                                <td th:text="${log.typeIcon}"></td>
                                <td th:text="${log.operationName}"></td>
                                <td th:text="${log.success > 0} ? '成功' : '失败'"></td>
                                <td th:text="|${log.errorMsg}|"></td>
                                <td th:text="|${log.remark}|"></td>
                                <td th:text="${log.reqSummary}" style="word-break:break-all;"></td>
                                <td th:text="${log.respSummary}" style="word-break:break-all;"></td>
                                <td th:text="${log.endTimeStr}"></td>
                            </tr>
                            <tr class="no-data"
                                th:styleappend="${#arrays.length(detailVo.dockingLogList) > 0} ? 'display: none'">
                                <td colspan="9" th:text="加载失败" style="text-align: center"></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </section>
            </section>

        </div>
    </div>
</div>

<!-- 用户短信 -->
<div class="layui-hide" id="modal-sms-customer">
    <th:block
            th:if="${detailVo.platWork == #globalConsts.PLAT_MARK_YEYX}"
            th:replace="~{common/otherTmpl :: sendSms(${T(com.zmn.oms.common.constant.MessageRuleIdConsts).YEYX_MESSAGE_TO_USER_LIST})}"/>
</div>

<!-- 师傅短信 -->
<div class="layui-hide" id="modal-sms-master">
    <th:block
            th:if="${detailVo.platWork == #globalConsts.PLAT_MARK_YEYX}"
            th:replace="~{common/otherTmpl :: sendSms(${T(com.zmn.oms.common.constant.MessageRuleIdConsts).YEYX_MESSAGE_TO_MASTER_LIST})}"/>
</div>

<div class="videos"></div>

<script th:inline="javascript">

    var logs = [[${detailVo.logList}]];
    var plat = [[${detailVo.platWork}]];
    var moduleId = [[${moduleId}]];
    var defaultModuleId = [[${moduleId}]];
    var gwmTxt = '[[${staff}]]'; //水印文字
    var isExistTrack = [[${detailVo.existTrack}]];
    var isExistOngoingTrack = [[${detailVo.existOngoingTrack}]];
    var cmsVideoRecord = [[${detailVo.cmsVideoRecord}]];
    var abutmenterName = [[${detailVo.abutmenterName}]];
    var detailVo = [[${detailVo}]];
    var serviceItemList = [[${detailVo.serviceItemList}]];

        layui.config({
            base: "/static/js/module/",
            version: 20221013001
        }).extend({
            oms_work_detail: "work/zmn.oms.work.detail"
        }).use(['index', 'oms_work_detail']);


</script>
</body>
</html>
